package com.training.regex;

import java.util.Arrays;

public class RegexDemo03 {
	public static void main(String[] args) {

		String str = "刘备-50-男-君主";
		
		String [] s = str.split("[-]");
		String [] s2 = str.split("[-]",3);
		
		System.out.println(Arrays.toString(s));
		System.out.println(Arrays.toString(s2));
	}
}
